<%--
  Created by IntelliJ IDEA.
  User: 13437
  Date: 2023/9/1
  Time: 9:00
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>用户信息</title>
    <link rel="stylesheet" href="/static/plugins/layui2.7.6/css/layui.css">
</head>
<body>
<div class="layui-layout layui-layout-admin">

    <%--头部与左侧样式--%>
    <jsp:include page="../commons/head.jsp"/>

    <div class="layui-body">
        <!-- 内容主体区域 -->
        <div style="padding: 15px;">

            <div class="layui-row">
                <div class="layui-col-md6 layui-col-md-offset3" >
                    <form class="layui-form" action="/profile" method="post">
                        <input type="hidden" value="${user.id}" name="id">
                        <div class="layui-form-item">
                            <label class="layui-form-label">登入名</label>
                            <div class="layui-input-block">
                                <input type="text" name="username" lay-verify="title" autocomplete="off" value="${user.username}" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">真实名</label>
                            <div class="layui-input-block">
                                <input type="text" name="name" lay-verify="title" autocomplete="off" value="${user.name}" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">性别</label>
                            <div class="layui-input-block">
                                <input type="radio" name="gender" lay-verify="title" autocomplete="off" value="男" ${user.gender == '男' ? 'checked' : ''} class="layui-input">男
                                <input type="radio" name="gender" lay-verify="title" autocomplete="off" value="女" ${user.gender == '女' ? 'checked' : ''} class="layui-input">女
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">权限</label>
                            <div class="layui-input-block">
                                <select name="permission" id="permission">
                                    <option value="1" ${user.permission == '1' ? 'selected' : ''}  >管理员</option>
                                    <option value="2" ${user.permission == '2' ? 'selected' : ''}>服务员</option>
                                </select>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">描述</label>
                            <div class="layui-input-block">
                                <textarea name="remark" id="" style="resize: none" cols="30" rows="10">${user.remark}</textarea>
                            </div>
                        </div>


                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button type="submit" onclick="return confirm('您确定修改吗?')" class="layui-btn" lay-submit="" lay-filter="demo1">修改</button>
                                <a onclick="window.history.go(-1)" class="layui-btn layui-btn-primary">返回</a>
                            </div>
                        </div>

                    </form>


                </div>
            </div>

        </div>
    </div>

    <%--引入底部样式--%>
    <jsp:include page="../commons/footer.jsp"/>


</div>


<script src="/static/plugins/layui2.7.6/layui.js"></script>
<script>
    layui.use(['element', 'layer', 'util', 'carousel','upload'], function () {
        var element = layui.element
            , layer = layui.layer
            , util = layui.util
            , $ = layui.$;
        var carousel = layui.carousel;
        var upload = layui.upload;
    });
</script>


</body>
</html>
